'''
Author: Ryan
Email: 409266255@qq.com
Date: 2025-09-19 17:21:43

LastEditors: Ryan
LastEditTime: 2025-09-29 16:09:57
Description: 常量定义

FilePath: /qopilot/qopilot/constant.py
Copyright (c) 2025 by Ryan, All Rights Reserved. 
'''

from enum import Enum


class HKConstants(Enum):
    """港股常量"""

    # 数据接口
    API_HK_BASIC = "hk_basic"               # 港股列表
    API_HK_TRADE_CALENDAR = "hk_tradecal"   # 港股交易日历
    API_HK_DAILY = "hk_daily"               # 港股行情
    API_HK_DAILY_ADJ = "hk_daily_adj"       # 港股复权行情

    HK_STOCKS_LIST_FIELDS = [
        'code',     # 股票代码
        'name',     # 股票名称
        'date'      # 日期
    ]

    HK_STOCK_HIST_FIELDS = [
        'date',             # 日期
        'open',             # 开盘
        'close',            # 收盘
        'high',             # 最高
        'low',              # 最低
        'volume',           # 成交量
        'amount',           # 成交额
        'pct_change',       # 涨跌幅
    ]


class Frequency(Enum):
    """数据频率常量"""
    DAILY = 'daily'
    WEEKLY = 'weekly'
    MONTHLY = 'monthly'


class Adjust(Enum):
    """调整方式常量"""
    HFQ = 'hfq'
    QFQ = 'qfq'
    NONE = 'none'


class TradeDate(Enum):
    """开始日期常量"""
    START_DATE = '20100101'
